/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.gob.fonafe.dao.impl.stored;

import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.object.StoredProcedure;

/**
 *
 * @author czela
 */
public class RegistraBienesBySubastaSP extends StoredProcedure{

    public static final String PROC_PARAM="USERGLC.P_REGISTRA_BIENES_SUBASTA";

    public RegistraBienesBySubastaSP(DataSource ds) {
        super(ds, PROC_PARAM);

        declareParameter(new SqlParameter("P_ID_SUBASTA", Types.VARCHAR));
        declareParameter(new SqlParameter("P_ID_BIEN", Types.VARCHAR));
        declareParameter(new SqlParameter("P_ID_CLASE_SUBASTA", Types.VARCHAR));
        declareParameter(new SqlParameter("P_version", Types.VARCHAR));
        declareParameter(new SqlOutParameter("V_MENSAJE", Types.VARCHAR));
        declareParameter(new SqlOutParameter("V_EXITO", Types.VARCHAR));
        compile();
    }


    public Map execute(String idSubasta,String idBien,String claseSubasta,String version) {
        Map inputs= new HashMap();
        inputs.put("P_ID_SUBASTA", idSubasta);
        inputs.put("P_ID_BIEN", idBien);
        inputs.put("P_ID_CLASE_SUBASTA", claseSubasta);
        inputs.put("P_version", version);
        return super.execute(inputs);
    }

    







}
